package com.ruoyi.resturant.service.impl;
import com.ruoyi.resturant.domain.Student;
import com.ruoyi.resturant.mapper.StudentMapper;
import com.ruoyi.resturant.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements IStudentService {

    @Autowired
    private StudentMapper studentMapper;

    public List<Student> getStudents() {

        return  studentMapper.queryAll();
    }

    @Override
    public List<Student> selectStudentList(Student student){
        return studentMapper.selectStudentList(student);
    }
    @Override
    public Student selectStudentById(Long id){
        return studentMapper.selectStudentById(id);
    }
    @Override
    public int insertStudent(Student student){
        return studentMapper.insertStudent(student);
    }
    @Override
    public int updateStudent(Student student){
        return studentMapper.updateStudent(student);
    }
    @Override
    public int deleteStudentById(Long id){
        return studentMapper.deleteStudentById(id);
    }

}

